import { ElMessage } from 'element-plus';
class promptWord {
    //成功
    success(val, duration = 3000) {
        ElMessage.closeAll()
        ElMessage({
            message: val,
            type: 'success',
            duration
        });
    }
    //失败
    error(val) {
        ElMessage.closeAll()
        ElMessage({
            message: val,
            type: 'error'
        });
    }
    //警告
    warning(val) {
        ElMessage.closeAll()
        ElMessage({
            message: val,
            type: 'warning'
        });
    }
    //普通消息
    ordinary(val) {
        ElMessage.closeAll()
        ElMessage({
            message: val
        });
    }
}
export default new promptWord()